import request from "@/Http/request"

//获取会议室
export const GetRoom=async(data:any)=>{
    return request({
        url:"/api/MeetingRoom/ShowMeetRoom",
        method:"get",
        params:data
    });
};

//获取会议室(下拉)
export const GetRoomList=async()=>{
    return request({
        url:"/api/MeetingRoom/GetMeetRoom",
        method:"get",
    });
};

//新增会议室
export const AddRoom=async(data:any)=>{
    return request({
        url:"/api/MeetingRoom/AddMeetRoom",
        method:"post",
        data
    });
};

//删除会议室
export const DeleteRoom=async(data:any)=>{
    return request({
        url:"/api/MeetingRoom/DeleteMeetRoom?Id="+data,
        method:"delete",
    });
};

//批量删除会议室
export const BatchDeleteRoom=async(data:any)=>{
    return request({
        url:"/api/MeetingRoom/BatchDeleteRoom",
        method:"delete",
        data
    });
};

//编辑会议室
export const UpdateRoom=async(data:any)=>{
    return request({
        url:"/api/MeetingRoom/UpdateMeetRoom",
        method:"put",
        data
    });
};

//获取会议预约记录
export const GetAppiont=async(data:any)=>{
    return request({
        url:"/api/MeetAppiont/MeetAppiontList",
        method:"get",
        params:data
    });
};


//预约会议
export const AddAppiont=async(data:any)=>{
    return request({
        url:"/api/MeetAppiont/AddAppionMent",
        method:"post",
        data
    });
};


//编辑会议
export const UpdateAppiont=async(data:any)=>{
    return request({
        url:"/api/MeetAppiont/UpdateAppionMent",
        method:"put",
        data
    });
};

//获取会议审批记录
export const GetApproval=async(data:any)=>{
    return request({
        url:"/api/MeetingApproval/ShowApprove",
        method:"get",
        params:data
    });
};


//审批会议
export const ApprovalMeet=async(data:any)=>{
    return request({
        url:"/api/MeetingApproval/ApprovalMeeting",
        method:"put",
        params:data
    });
};